﻿
Imports System.IO

Public Class abbr
    Inherits xhtmlControl

    Protected Overrides Function availableAttribute(ByVal key As String) As Boolean
        Return attributesCollection.common(key)
    End Function

    Public Sub New(Optional ByVal buff As Stream = Nothing)
        MyBase.New(buff, "abbr")
    End Sub

End Class

Public Class acronym
    Inherits xhtmlControl

    Protected Overrides Function availableAttribute(ByVal key As String) As Boolean
        Return attributesCollection.common(key)
    End Function

    Public Sub New(Optional ByVal buff As Stream = Nothing)
        MyBase.New(buff, "acronym")
    End Sub
End Class

Public Class address
    Inherits xhtmlControl

    Protected Overrides Function availableAttribute(ByVal key As String) As Boolean
        Return attributesCollection.common(key)
    End Function

    Public Sub New(Optional ByVal buff As Stream = Nothing)
        MyBase.New(buff, "address")
    End Sub
End Class

Public Class blockquote
    Inherits xhtmlControl

    Protected Overrides Function availableAttribute(ByVal key As String) As Boolean
        Return attributesCollection.common(key) OrElse _
                attributesCollection.cite(key)
    End Function

    Public Sub New(Optional ByVal buff As Stream = Nothing)
        MyBase.New(buff, "blockquote")
    End Sub
End Class

Public Class br
    Inherits onelineXHtmlControl

    Protected Overrides Function availableAttribute(ByVal key As String) As Boolean
        Return attributesCollection.core(key)
    End Function

    Public Sub New(Optional ByVal buff As Stream = Nothing)
        MyBase.New(buff, "br")
    End Sub

#If RETIRED Then
    'in xhtml, br should be end with " />", though it will cost 2 more bytes, following rules is better
    'no " />" needed, just a ">" for br
    Protected Overrides Function _tagfinal() As String
        Return tagfinal()
    End Function
#End If

    Public Shared Sub unittest()
        Dim inst As br = Nothing
        inst = New br()
        Console.WriteLine(inst.ToString())
    End Sub
End Class

Public Class cite
    Inherits xhtmlControl

    Protected Overrides Function availableAttribute(ByVal key As String) As Boolean
        Return attributesCollection.common(key)
    End Function

    Public Sub New(Optional ByVal buff As Stream = Nothing)
        MyBase.New(buff, "cite")
    End Sub
End Class

Public Class code
    Inherits xhtmlControl

    Protected Overrides Function availableAttribute(ByVal key As String) As Boolean
        Return attributesCollection.common(key)
    End Function

    Public Sub New(Optional ByVal buff As Stream = Nothing)
        MyBase.New(buff, "code")
    End Sub
End Class

Public Class dfn
    Inherits xhtmlControl

    Protected Overrides Function availableAttribute(ByVal key As String) As Boolean
        Return attributesCollection.common(key)
    End Function

    Public Sub New(Optional ByVal buff As Stream = Nothing)
        MyBase.New(buff, "dfn")
    End Sub
End Class

Public Class div
    Inherits xhtmlControl

    Protected Overrides Function isonelineControl() As Boolean
        Return False
    End Function

    Protected Overrides Function availableAttribute(ByVal key As String) As Boolean
        Return attributesCollection.common(key)
    End Function

    Public Sub New(Optional ByVal buff As Stream = Nothing)
        MyBase.New(buff, "div")
    End Sub
End Class

Public Class em
    Inherits xhtmlControl

    Protected Overrides Function availableAttribute(ByVal key As String) As Boolean
        Return attributesCollection.common(key)
    End Function

    Public Sub New(Optional ByVal buff As Stream = Nothing)
        MyBase.New(buff, "em")
    End Sub
End Class

Public Class h1
    Inherits xhtmlControl

    Protected Overrides Function availableAttribute(ByVal key As String) As Boolean
        Return attributesCollection.common(key)
    End Function

    Public Sub New(Optional ByVal buff As Stream = Nothing)
        MyBase.New(buff, "h1")
    End Sub
End Class

Public Class h2
    Inherits xhtmlControl

    Protected Overrides Function availableAttribute(ByVal key As String) As Boolean
        Return attributesCollection.common(key)
    End Function

    Public Sub New(Optional ByVal buff As Stream = Nothing)
        MyBase.New(buff, "h2")
    End Sub
End Class

Public Class h3
    Inherits xhtmlControl

    Protected Overrides Function availableAttribute(ByVal key As String) As Boolean
        Return attributesCollection.common(key)
    End Function

    Public Sub New(Optional ByVal buff As Stream = Nothing)
        MyBase.New(buff, "h3")
    End Sub
End Class

Public Class h4
    Inherits xhtmlControl

    Protected Overrides Function availableAttribute(ByVal key As String) As Boolean
        Return attributesCollection.common(key)
    End Function

    Public Sub New(Optional ByVal buff As Stream = Nothing)
        MyBase.New(buff, "h4")
    End Sub
End Class

Public Class h5
    Inherits xhtmlControl

    Protected Overrides Function availableAttribute(ByVal key As String) As Boolean
        Return attributesCollection.common(key)
    End Function

    Public Sub New(Optional ByVal buff As Stream = Nothing)
        MyBase.New(buff, "h5")
    End Sub
End Class

Public Class h6
    Inherits xhtmlControl

    Protected Overrides Function availableAttribute(ByVal key As String) As Boolean
        Return attributesCollection.common(key)
    End Function

    Public Sub New(Optional ByVal buff As Stream = Nothing)
        MyBase.New(buff, "h6")
    End Sub
End Class

Public Class kbd
    Inherits xhtmlControl

    Protected Overrides Function availableAttribute(ByVal key As String) As Boolean
        Return attributesCollection.common(key)
    End Function

    Public Sub New(Optional ByVal buff As Stream = Nothing)
        MyBase.New(buff, "kbd")
    End Sub
End Class

Public Class p
    Inherits xhtmlControl

    Protected Overrides Function availableAttribute(ByVal key As String) As Boolean
        Return attributesCollection.common(key)
    End Function

    Public Sub New(Optional ByVal buff As Stream = Nothing)
        MyBase.New(buff, "p")
    End Sub

    Public Shared Sub unittest()
        Dim inst As p = Nothing
        inst = New p()
        Console.WriteLine(inst.ToString())
    End Sub
End Class

Public Class pre
    Inherits xhtmlControl

    Protected Overrides Function availableAttribute(ByVal key As String) As Boolean
        Return attributesCollection.common(key)
    End Function

    Protected Overrides Function isonelineControl() As Boolean
        Return False
    End Function

    Protected Overrides Function render(ByVal compress As Boolean) As Boolean
#If RETIRED Then
        If text Is Nothing OrElse isemptystring(text.ToString()) Then
            text = Global.character.blank
        End If
#End If
        Return MyBase.render(True)
    End Function

    Public Sub New(Optional ByVal buff As Stream = Nothing)
        MyBase.New(buff, "pre")
    End Sub
End Class

Public Class q
    Inherits xhtmlControl

    Protected Overrides Function availableAttribute(ByVal key As String) As Boolean
        Return attributesCollection.common(key) OrElse _
                attributesCollection.cite(key)
    End Function

    Public Sub New(Optional ByVal buff As Stream = Nothing)
        MyBase.New(buff, "q")
    End Sub
End Class

Public Class samp
    Inherits xhtmlControl

    Protected Overrides Function availableAttribute(ByVal key As String) As Boolean
        Return attributesCollection.common(key)
    End Function

    Public Sub New(Optional ByVal buff As Stream = Nothing)
        MyBase.New(buff, "samp")
    End Sub
End Class

Public Class span
    Inherits xhtmlControl

    Protected Overrides Function availableAttribute(ByVal key As String) As Boolean
        Return attributesCollection.common(key)
    End Function

    Public Sub New(Optional ByVal buff As Stream = Nothing)
        MyBase.New(buff, "span")
    End Sub
End Class

Public Class strong
    Inherits xhtmlControl

    Protected Overrides Function availableAttribute(ByVal key As String) As Boolean
        Return attributesCollection.common(key)
    End Function

    Public Sub New(Optional ByVal buff As Stream = Nothing)
        MyBase.New(buff, "strong")
    End Sub
End Class

Public Class var
    Inherits xhtmlControl

    Protected Overrides Function availableAttribute(ByVal key As String) As Boolean
        Return attributesCollection.common(key)
    End Function

    Public Sub New(Optional ByVal buff As Stream = Nothing)
        MyBase.New(buff, "var")
    End Sub
End Class
